{
  "properties" : { },
  "id" : "7e31546a50494dea99edf80b6d485915",
  "script" : null,
  "groupId" : "59a2b1b681874d929e5cd97a11fc0c59",
  "name" : "修改snmp配置",
  "createTime" : 1727071072192,
  "updateTime" : 1725011535284,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "update",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"id\":\"1829455426329120768\",\r\n    \"roCommunity\":\"public\",\r\n    \"rwCommunity\":\"private\",\r\n    \"snmpVersion\":1,\r\n    \"snmpUser\":\"CESHI\",\r\n    \"snmpPass\":\"snmppassword\",\r\n    \"port\":161}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": 0\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "root",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "id",
      "value" : "1796104642735431681",
      "description" : "",
      "required" : true,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "roCommunity",
      "value" : "public",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "rwCommunity",
      "value" : "private",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "snmpVersion",
      "value" : "1",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "snmpUser",
      "value" : "CESHI",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "snmpPass",
      "value" : "snmppassword",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "port",
      "value" : "161",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "status",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "0",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
return db.update("""
    update auto_discover_snmp_config 
        <set> 

            <if test="!is_null(body.port)">
                port = #{body.port},
            </if>

            <if test="!is_blank(body.roCommunity)">
                 ro_Community = #{body.roCommunity}, 
             </if>

             <if test="!is_blank(body.rwCommunity)">
                 rw_Community = #{body.rwCommunity},
             </if>


            <if test="!is_null(body.snmpVersion)">
                snmp_Version = #{body.snmpVersion},
            </if>

            <if test="!is_blank(body.snmpUser)">
                  snmp_User = #{body.snmpUser},
            </if>

            <if test="!is_blank(body.snmpPass)">
                   snmp_Pass = #{body.snmpPass}
            </if>             
           
         </set>
    where id = #{body.id}
""")